package utils;

import java.util.Calendar;
import java.util.Locale;
import java.util.TimerTask;

import com.samsung.dementia.database.MySQLManager;

public class MysqlTimeoutTimerTask extends TimerTask 
{
	@Override
	public void run() 
	{
		Calendar calendar = Calendar.getInstance(Locale.KOREA);

		int hour = calendar.get(Calendar.HOUR_OF_DAY);
		if( (hour == 23) || (hour == 0) )
		{
			
		} else {
			MySQLManager manager = MySQLManager.getInstance();
			if (manager.connect()) {
				manager.vaildConnection();
			}			
		}
	}
}
